package cn.lzy.demo;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Description
 * @Author Administrator
 * @Date 2023/12/19 9:32
 * @Version
 **/
public class TestDemoJava {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(JavaConfig.class);
        ICalculator calculator = ctx.getBean(ICalculator.class);
        int result = calculator.add(2, 3);
        System.out.println("add = " +result);
        System.out.println("================");
        calculator.minus(6, 3);
    }
}
